home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / src / yacc / skeleton.c < prev    next >
C/C++ Source or Header  |  1995-06-01  |  646b  |  41 lines

  1. #include "defs.h"
  2.  
  3. char *header[] =
  4. {
  5.   "#open \"obj\";;",
  6.   "#open \"parsing\";;",
  7.   0
  8. };
  9.  
  10. char *define_tables[] =
  11. {
  12.   "let yytables =",
  13.   "  { actions=yyact;",
  14.   "    transl=yytransl;",
  15.   "    lhs=yylhs;",
  16.   "    len=yylen;",
  17.   "    defred=yydefred;",
  18.   "    dgoto=yydgoto;",
  19.   "    sindex=yysindex;",
  20.   "    rindex=yyrindex;",
  21.   "    gindex=yygindex;",
  22.   "    tablesize=YYTABLESIZE;",
  23.   "    table=yytable;",
  24.   "    check=yycheck };;",
  25.   0
  26. };
  27.  
  28. write_section(section)
  29. char *section[];
  30. {
  31.     register int i;
  32.     register FILE *fp;
  33.  
  34.     fp = code_file;
  35.     for (i = 0; section[i]; ++i)
  36.     {
  37.     ++outline;
  38.     fprintf(fp, "%s\n", section[i]);
  39.     }
  40. }
  41.